﻿@model TaskManager.Models.Task

@{
    ViewBag.Title = "添加";
}

<h2>添加</h2>


@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()

    <div class="form-horizontal">
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        <div class="form-group">
            @Html.LabelFor(model => model.TaskPriority, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                <label class="radio-inline">
                    <input type="radio" value="1" name="TaskPriority" checked />高
                </label>
                <label class="radio-inline">
                    <input type="radio" value="2" name="TaskPriority" />中
                </label>
                <label class="radio-inline">
                    <input type="radio" value="3" name="TaskPriority" />低
                </label>
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Content, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Content, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Content, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.uid, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @* 数据源名称(必须与后台保持一致)，null，html样式 *@
                @Html.DropDownList("uid", null, new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.uid, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="添加" class="btn btn-primary" />
                @Html.ActionLink("返回列表", "Index", null, new { @class = "btn btn-primary" })
            </div>
        </div>
    </div>
}

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
